home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL / glfragmentmaterial.z / glfragmentmaterial
Encoding:
Text File  |  2002-10-03  |  15.9 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallllffffSSSSGGGGIIIIXXXX,,,, ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaalllliiiiSSSSGGGGIIIIXXXX,,,,
  10.      ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallllffffvvvvSSSSGGGGIIIIXXXX,,,, ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaalllliiiivvvvSSSSGGGGIIIIXXXX - specify fragment
  11.      material parameters for the fragment lighting model
  12.  
  13.  
  14. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  15.      void ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallllffffSSSSGGGGIIIIXXXX( GLenum _f_a_c_e,
  16.                                    GLenum _p_n_a_m_e,
  17.                                    GLfloat _p_a_r_a_m )
  18.      void ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaalllliiiiSSSSGGGGIIIIXXXX( GLenum _f_a_c_e,
  19.                                    GLenum _p_n_a_m_e,
  20.                                    GLint _p_a_r_a_m )
  21.  
  22.  
  23. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  24.      _f_a_c_e    Specifies which face or faces are being updated.  Must be one of
  25.              GGGGLLLL____FFFFRRRROOOONNNNTTTT, GGGGLLLL____BBBBAAAACCCCKKKK, or GGGGLLLL____FFFFRRRROOOONNNNTTTT____AAAANNNNDDDD____BBBBAAAACCCCKKKK.
  26.  
  27.      _p_n_a_m_e   Specifies the single-valued fragment material parameter of the
  28.              face or faces that is being updated.  Must be GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS.
  29.  
  30.      _p_a_r_a_m   Specifies the value that parameter GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS will be set to.
  31.  
  32. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  33.      void ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallllffffvvvvSSSSGGGGIIIIXXXX( GLenum _f_a_c_e,
  34.                                     GLenum _p_n_a_m_e,
  35.                                     const GLfloat *_p_a_r_a_m_s )
  36.      void ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaalllliiiivvvvSSSSGGGGIIIIXXXX( GLenum _f_a_c_e,
  37.                                     GLenum _p_n_a_m_e,
  38.                                     const GLint *_p_a_r_a_m_s )
  39.  
  40.  
  41. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  42.      _f_a_c_e Specifies which face or faces are being updated.  Must be one of
  43.           GGGGLLLL____FFFFRRRROOOONNNNTTTT, GGGGLLLL____BBBBAAAACCCCKKKK, or GGGGLLLL____FFFFRRRROOOONNNNTTTT____AAAANNNNDDDD____BBBBAAAACCCCKKKK.
  44.  
  45.      _p_n_a_m_e
  46.           Specifies the fragment material parameter of the face or faces that
  47.           is being updated.  Must be one of GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT, GGGGLLLL____DDDDIIIIFFFFFFFFUUUUSSSSEEEE,
  48.           GGGGLLLL____SSSSPPPPEEEECCCCUUUULLLLAAAARRRR, GGGGLLLL____EEEEMMMMIIIISSSSSSSSIIIIOOOONNNN, GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS, GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT____AAAANNNNDDDD____DDDDIIIIFFFFFFFFUUUUSSSSEEEE,  or
  49.           GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXXEEEESSSS.
  50.  
  51.      _p_a_r_a_m_s
  52.           Specifies a pointer to the value or values that _p_n_a_m_e will be set
  53.           to.
  54.  
  55. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  56.      ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll assigns values to fragment material parameters.  There
  57.      are two matched sets of fragment material parameters.  One, the _f_r_o_n_t-
  58.      _f_a_c_i_n_g set, is used to shade points, lines, bitmaps, and all polygons
  59.      (when two-sided lighting is disabled), or just front-facing polygons
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      (when two-sided lighting is enabled).  The other set, _b_a_c_k-_f_a_c_i_n_g, is
  75.      used to shade back-facing polygons only when two-sided lighting is
  76.      enabled.  Refer to the ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttLLLLiiiigggghhhhttttMMMMooooddddeeeellll reference page for details
  77.      concerning one- and two-sided lighting calculations.
  78.  
  79.      ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll takes three arguments.  The first, _f_a_c_e, specifies
  80.      whether the GGGGLLLL____FFFFRRRROOOONNNNTTTT fragment materials, the GGGGLLLL____BBBBAAAACCCCKKKK fragment materials,
  81.      or both GGGGLLLL____FFFFRRRROOOONNNNTTTT____AAAANNNNDDDD____BBBBAAAACCCCKKKK fragment materials will be modified.  The
  82.      second, _p_n_a_m_e, specifies which of several parameters in one or both sets
  83.      will be modified.  The third, _p_a_r_a_m_s, specifies what value or values will
  84.      be assigned to the specified parameter.
  85.  
  86.      Fragment material parameters are used in the lighting equation that is
  87.      optionally applied to each fragment.  The equation is discussed in the
  88.      ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttLLLLiiiigggghhhhttttMMMMooooddddeeeellll reference page.  The parameters that can be
  89.      specified using ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll, and their interpretations by the
  90.      lighting equation, are as follows:
  91.  
  92.      GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT          _p_a_r_a_m_s contains four integer or floating-point values
  93.                          that specify the ambient RGBA reflectance of the
  94.                          fragment material.  Integer values are mapped
  95.                          linearly such that the most positive representable
  96.                          value maps to 1.0, and the most negative
  97.                          representable value maps to -1.0.  Floating-point
  98.                          values are mapped directly.  Neither integer nor
  99.                          floating-point values are clamped.  The initial
  100.                          ambient reflectance for both front- and back-facing
  101.                          fragment materials is (0.2, 0.2, 0.2, 1.0).
  102.  
  103.      GGGGLLLL____DDDDIIIIFFFFFFFFUUUUSSSSEEEE          _p_a_r_a_m_s contains four integer or floating-point values
  104.                          that specify the diffuse RGBA reflectance of the
  105.                          fragment material.  Integer values are mapped
  106.                          linearly such that the most positive representable
  107.                          value maps to 1.0, and the most negative
  108.                          representable value maps to -1.0.  Floating-point
  109.                          values are mapped directly.  Neither integer nor
  110.                          floating-point values are clamped.  The initial
  111.                          diffuse reflectance for both front- and back-facing
  112.                          fragment materials is (0.8, 0.8, 0.8, 1.0).
  113.  
  114.      GGGGLLLL____SSSSPPPPEEEECCCCUUUULLLLAAAARRRR         _p_a_r_a_m_s contains four integer or floating-point values
  115.                          that specify the specular RGBA reflectance of the
  116.                          fragment material.  Integer values are mapped
  117.                          linearly such that the most positive representable
  118.                          value maps to 1.0, and the most negative
  119.                          representable value maps to -1.0.  Floating-point
  120.                          values are mapped directly.  Neither integer nor
  121.                          floating-point values are clamped.  The initial
  122.                          specular reflectance for both front- and back-facing
  123.                          fragment materials is (0, 0, 0, 1).
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))
  137.  
  138.  
  139.  
  140.      GGGGLLLL____EEEEMMMMIIIISSSSSSSSIIIIOOOONNNN         _p_a_r_a_m_s contains four integer or floating-point values
  141.                          that specify the RGBA emitted light intensity of the
  142.                          fragment material.  Integer values are mapped
  143.                          linearly such that the most positive representable
  144.                          value maps to 1.0, and the most negative
  145.                          representable value maps to -1.0.  Floating-point
  146.                          values are mapped directly.  Neither integer nor
  147.                          floating-point values are clamped.  The initial
  148.                          emission intensity for both front- and back-facing
  149.                          fragment materials is (0, 0, 0, 1).
  150.  
  151.      GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS        _p_a_r_a_m_s is a single integer or floating-point value
  152.                          that specifies the RGBA specular exponent of the
  153.                          fragment material.  Integer and floating-point values
  154.                          are mapped directly.  Only values in the range
  155.                          [0,128] are accepted.  The initial specular exponent
  156.                          for both front- and back-facing fragment materials is
  157.                          0.
  158.  
  159.      GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT____AAAANNNNDDDD____DDDDIIIIFFFFFFFFUUUUSSSSEEEE
  160.                          Equivalent to calling ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll twice with
  161.                          the same parameter values, once with GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT and
  162.                          once with GGGGLLLL____DDDDIIIIFFFFFFFFUUUUSSSSEEEE.
  163.  
  164.      GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXXEEEESSSS    _p_a_r_a_m_s contains three integer or floating-point
  165.                          values specifying the color indices for ambient,
  166.                          diffuse, and specular lighting.  These three values,
  167.                          and GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS, are the only fragment material
  168.                          values used by the color index mode lighting
  169.                          equation.  Refer to the ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttLLLLiiiigggghhhhttttMMMMooooddddeeeellll
  170.                          reference page for a discussion of color index
  171.                          lighting.
  172.  
  173. NNNNOOOOTTTTEEEESSSS
  174.      The fragment material parameters can be updated at any time.  In
  175.      particular, ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll can be called between a call to ggggllllBBBBeeeeggggiiiinnnn
  176.      and the corresponding call to ggggllllEEEEnnnndddd.
  177.  
  178.      While the ambient, diffuse, specular and emission fragment material
  179.      parameters all have alpha components, only the diffuse alpha component is
  180.      used in the lighting computation.
  181.  
  182. EEEERRRRRRRROOOORRRRSSSS
  183.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if either _f_a_c_e or _p_n_a_m_e is not an accepted
  184.      value.
  185.  
  186.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if a specular exponent outside the range
  187.      [0,128] is specified.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))
  203.  
  204.  
  205.  
  206. ASSOCIATED GETS
  207.      ggggllllGGGGeeeettttFFFFrrrraaaaggggmmmmeeeennnnttttMMMMaaaatttteeeerrrriiiiaaaallll
  208.  
  209.  
  210. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  211.      The SSSSGGGGIIIIXXXX____ffffrrrraaaaggggmmmmeeeennnntttt____lllliiiigggghhhhttttiiiinnnngggg extension is supported only on OOOOccccttttaaaannnneeee2222 VVVVPPPPrrrroooo
  212.      systems.
  213.  
  214.  
  215. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  216.      ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttCCCCoooolllloooorrrrMMMMaaaatttteeeerrrriiiiaaaallll, ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttLLLLiiiigggghhhhtttt, ggggllllFFFFrrrraaaaggggmmmmeeeennnnttttLLLLiiiigggghhhhttttMMMMooooddddeeeellll
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.